import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const router = 'router'
const headimg = 'headimg'
const userid = 'userid'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function setrouter(routers) {
  return Cookies.set(router, routers)
}

export function getrouter() {
  return Cookies.get(router)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function setUserId(userId) {
  return Cookies.set(userid, userId)
}

export function getUserId(userId) {
  return Cookies.get(userid)
}

export function setAVATAR(pic) {
  return Cookies.set(headimg, pic)
}